****APPENDIX FIGURE C1-C6****

cd "$main_dir/output/figures/appendix_c"

graph set window fontface "Palatino"

//--------------------------------------------------------
//Create Figure C1
//--------------------------------------------------------
clear
use "$data_dir/clean/country_year_cohort_panel.dta"

keep if survey_year==2001
keep if chrt_total>=50 & chrt_total!=.

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", title(1930s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1930s_growth_2001.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", title(1940s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1940s_growth_2001.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", title(1950s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1950s_growth_2001.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", title(1960s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1960s_growth_2001.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", title(1970s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1970s_growth_2001.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", title(1980s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1980s_growth_2001.gph", replace

gr combine wthn_1930s_growth_2001.gph wthn_1940s_growth_2001.gph wthn_1950s_growth_2001.gph wthn_1960s_growth_2001.gph wthn_1970s_growth_2001.gph wthn_1980s_growth_2001.gph, graphregion(color(white)) title(2001, color(black)) cols(4)
graph export "figure_c1.png", replace

erase "wthn_1930s_growth_2001.gph" 
erase "wthn_1940s_growth_2001.gph" 
erase "wthn_1950s_growth_2001.gph" 
erase "wthn_1960s_growth_2001.gph" 
erase "wthn_1970s_growth_2001.gph" 
erase "wthn_1980s_growth_2001.gph"

//--------------------------------------------------------
//Create Figure C2
//--------------------------------------------------------
clear
use "$data_dir/clean/country_year_cohort_panel.dta"

keep if survey_year==2005
keep if chrt_total>=50 & chrt_total!=.

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", title(1930s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1930s_growth_2005.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", title(1940s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1940s_growth_2005.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", title(1950s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1950s_growth_2005.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", title(1960s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1960s_growth_2005.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", title(1970s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1970s_growth_2005.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", title(1980s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1980s_growth_2005.gph", replace

gr combine wthn_1930s_growth_2005.gph wthn_1940s_growth_2005.gph wthn_1950s_growth_2005.gph wthn_1960s_growth_2005.gph wthn_1970s_growth_2005.gph wthn_1980s_growth_2005.gph, graphregion(color(white)) title(2005, color(black)) cols(4)
graph export "figure_c2.png", replace

erase "wthn_1930s_growth_2005.gph" 
erase "wthn_1940s_growth_2005.gph" 
erase "wthn_1950s_growth_2005.gph" 
erase "wthn_1960s_growth_2005.gph" 
erase "wthn_1970s_growth_2005.gph" 
erase "wthn_1980s_growth_2005.gph"


//--------------------------------------------------------
//Create Figure C3
//--------------------------------------------------------
clear
use "$data_dir/clean/country_year_cohort_panel.dta"

keep if survey_year==2010
keep if chrt_total>=50 & chrt_total!=.

drop if ccode=="QAT"

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", title(1930s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1930s_growth_2010.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", title(1940s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1940s_growth_2010.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", title(1950s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1950s_growth_2010.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", title(1960s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1960s_growth_2010.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1970s" & chrt_wgrowth_rate_1<0.1 & chrt_wgrowth_rate_1!=., mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", title(1970s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1970s_growth_2010.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", title(1980s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1980s_growth_2010.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1990s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1990s", title(1990s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1990s_growth_2010.gph", replace

gr combine wthn_1930s_growth_2010.gph wthn_1940s_growth_2010.gph wthn_1950s_growth_2010.gph wthn_1960s_growth_2010.gph wthn_1970s_growth_2010.gph wthn_1980s_growth_2010.gph wthn_1990s_growth_2010.gph, graphregion(color(white)) title(2010, color(black)) cols(4)
graph export "figure_c3.png", replace

erase "wthn_1930s_growth_2010.gph" 
erase "wthn_1940s_growth_2010.gph" 
erase "wthn_1950s_growth_2010.gph" 
erase "wthn_1960s_growth_2010.gph" 
erase "wthn_1970s_growth_2010.gph" 
erase "wthn_1980s_growth_2010.gph" 
erase "wthn_1990s_growth_2010.gph"

//--------------------------------------------------------
//Create Figure C4
//--------------------------------------------------------
clear
use "$data_dir/clean/country_year_cohort_panel.dta"

keep if survey_year==2015
keep if chrt_total>=50 & chrt_total!=.

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1930s", title(1930s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1930s_growth_2015.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1940s" & chrt_wgrowth_rate_1>0 & chrt_wgrowth_rate_1<0.1, mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", title(1940s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1940s_growth_2015.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1950s" & chrt_wgrowth_rate_1>0 & chrt_wgrowth_rate_1<0.1, mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", title(1950s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1950s_growth_2015.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1960s" & chrt_wgrowth_rate_1>-0.01 & chrt_wgrowth_rate_1<0.1, mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", title(1960s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1960s_growth_2015.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1970s" & chrt_wgrowth_rate_1>-0.01 & chrt_wgrowth_rate_1<0.1, mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", title(1970s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1970s_growth_2015.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1980s" & chrt_wgrowth_rate_1>0 & chrt_wgrowth_rate_1<0.12, mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", title(1980s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1980s_growth_2015.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1990s" & chrt_wgrowth_rate_1>-0.01 & chrt_wgrowth_rate_1<0.12, mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1990s", title(1990s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1990s_growth_2015.gph", replace

gr combine wthn_1930s_growth_2015.gph wthn_1940s_growth_2015.gph wthn_1950s_growth_2015.gph wthn_1960s_growth_2015.gph wthn_1970s_growth_2015.gph wthn_1980s_growth_2015.gph wthn_1990s_growth_2015.gph, graphregion(color(white)) title(2015, color(black)) cols(4)
graph export "figure_c4.png", replace

erase "wthn_1930s_growth_2015.gph" 
erase "wthn_1940s_growth_2015.gph" 
erase "wthn_1950s_growth_2015.gph" 
erase "wthn_1960s_growth_2015.gph" 
erase "wthn_1970s_growth_2015.gph" 
erase "wthn_1980s_growth_2015.gph" 
erase "wthn_1990s_growth_2015.gph"

//--------------------------------------------------------
//Create Figure C5
//--------------------------------------------------------
clear
use "$data_dir/clean/country_year_cohort_panel.dta"

keep if survey_year==2019
keep if chrt_total>=50 & chrt_total!=.

drop if ccode=="LBY"

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1940s", title(1940s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1940s_growth_2019.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1950s", title(1950s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1950s_growth_2019.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1960s", title(1960s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1960s_growth_2019.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1970s", title(1970s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1970s_growth_2019.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1980s", title(1980s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1980s_growth_2019.gph", replace

scatter trust_govt chrt_wgrowth_rate_1 if cohort=="1990s", mlabel(ccode) mlabsize(tiny) msize(tiny) mlabcolor(black) xtitle(Average Lifetime Growth Experience) ytitle(Trust in Government) || lfit trust_govt chrt_wgrowth_rate_1 if cohort=="1990s", title(1990s, color(black)) ytitle(Trust in Government) graphregion(color(white)) bgcolor(white) ylabel(0(0.25)1,labs(small) format(%9.2f)) xlabel(-0.025(0.025)0.11,labs(small)) xtitle("Growth Experience", margin(small) size(small)) ytitle("Trust in Government", margin(small) size(small)) legend(off)
graph save "wthn_1990s_growth_2019.gph", replace

gr combine wthn_1940s_growth_2019.gph wthn_1950s_growth_2019.gph wthn_1960s_growth_2019.gph wthn_1970s_growth_2019.gph wthn_1980s_growth_2019.gph wthn_1990s_growth_2019.gph, graphregion(color(white)) title(2019, color(black)) cols(4)
graph export "figure_c5.png", replace

erase "wthn_1940s_growth_2019.gph" 
erase "wthn_1950s_growth_2019.gph" 
erase "wthn_1960s_growth_2019.gph" 
erase "wthn_1970s_growth_2019.gph" 
erase "wthn_1980s_growth_2019.gph" 
erase "wthn_1990s_growth_2019.gph"

//--------------------------------------------------------
//Create Figure C6
//--------------------------------------------------------
clear
use "$data_dir/clean/country_year_cohort_panel.dta"

keep if trust_govt!=.

scatter trust_govt chrt_wgrowth_rate_1 ///
	if  chrt_total>=50 & chrt_total!=., ///
	mcolor(gs12) by(survey_year, graphregion(color(white)) note("")) ///
	ytitle("Trust in Government") xtitle("Growth Experience")
graph export "figure_c6.png", replace
